﻿using System.Web.Mvc;
using System.Web.Routing;

namespace V5_CMSMvc4 {

    public class RouteConfig {

        public static void RegisterRoutes(RouteCollection routes) {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //routes.MapMvcAttributeRoutes();

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new string[] { "V5_EShop.Controllers" }
            );

            routes.MapRoute(
                name: "Default1",
                url: "{controller}/{action}/{classid}/{pageid}",
                defaults: new { controller = "Home", action = "Index", classid = UrlParameter.Optional, pageid = UrlParameter.Optional },
                namespaces: new string[] { "V5_EShop.Controllers" }
            );
        }
    }
}